#!/bin/bash

# download mysql
# wget https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.22-linux-glibc2.12-x86_64.tar.xz
# tar -xf mysql-8.0.22-linux-glibc2.12-x86_64.tar.xz
# cd mysql-8.0.22-linux-glibc2.12-x86_64

mkdir data
mkdir conf; cp ../../conf/my.conf conf/
./bin/mysqld --no-defaults --user=liuj --initialize-insecure --basedir=${PWD} --datadir=${PWD}/data
./bin/mysqld --defaults-file=conf/my.cnf

# mysql -uroot -h 127.0.0.1 --port=3306
# ALTER USER 'root'@'localhost' IDENTIFIED BY '123456'
